#pragma once

#include <vector>
#include <set>

class CVertex;
class CEdge;

enum GRAPH_RESULT{FAILED=-1, SUCCEED=0};

class CGraph
{
public:
	CGraph();
	~CGraph();

	int InsertVertex(char* szName);
	int InsertVertex(CVertex Vertex);
	int RemoveVertex(char* szVertexName);
	int RemoveVertex(CVertex Vertex);
	int FindVertex(char* szVertexName);
	int FindVertex(CVertex Vertex);
	void PrintAllVertex();


	int InsertEdge(char* szBeginVertexName, char* szEndVertexName);
	int InsertEdge(CVertex BeginVertex, CVertex EndVertex);
	int RemoveEdge(char* szBeginVertexName, char* szEndVertexName);
	int RemoveEdge(CVertex BeginVertex, CVertex EndVertex);
	int FindEdge(char* szBeginVertexName, char* szEndVertexName);
	int FindEdge(CVertex BeginVertex, CVertex EndVertex);
	void PrintAllEdge();

private:
	typedef std::set<CVertex> VertexSet;
	typedef std::set<CEdge> EdgeSet;

	VertexSet m_setVertex;
	EdgeSet m_setEdge;
};
